package syntaxTree;

import java.util.LinkedList;
  
public class LocalListCons<X> extends LocalList<X>
{
  X data;
  LocalList<X> next;
  
  public LocalListCons (X data, LocalList<X> next)
  {
    this.data = data;
    this.next = next;
  }
  
  public LinkedList<X> convert ()
  {
    LinkedList<X> list = next.convert ();
    list.addFirst (data);
    return list;
  }
}
